/*
 * CartEventResult.java
 * 
 * Created by demory on Feb 6, 2010, 9:57:50 PM
 * 
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.fpdev.apps.cart;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author demory
 */
public class CartEventResult {

  public enum Status { FAILURE, SUCCESS, CANCELED };

  public Status status_;

  public CartAction action_;

  public List<CartEventResult> subResults_;

  public CartEventResult() {
    subResults_ = new LinkedList<CartEventResult>();
  }

  public CartAction getAction() {
    return action_;
  }

  public void setAction(CartAction action) {
    action_ = action;
  }

  public Status getStatus() {
    return status_;
  }

  public void setStatus(Status status) {
    status_ = status;
  }

  public List<CartEventResult> getSubResults() {
    return subResults_;
  }

  public void addSubResult(CartEventResult cer) {
    subResults_.add(cer);
  }
}
